<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <title>登录</title>
    <link rel="stylesheet" th:href="@{/layui/layui.css}"/>
    <link rel="stylesheet" th:href="@{/css/login.css}"/>
    <script type="text/javascript" th:src="@{/js/jquery-3.2.1.js}"></script>

<style>
    .inputSty{
        font-size: 22px;
    }
</style>
</head>
<body class="beg-login-bg">
<div class="beg-login-box" style="height: 220px; width: 450px;margin-top: 200px;">
    <header>
        <h1>用户登录</h1>
        <div><img src="image/tim.png" style="position: absolute;width: 80px; left:330px;top: 20px" /></div>
        <div ><img src="image/logop.png" style="position: absolute; width: 1200px;top: 20px; left: 420px;"/></div>
    </header>
    <div class="beg-login-main" style="padding: 5px 10px;">
        <form action="/dor/login" class="layui-form" method="post">
            <div class="layui-form-item">
                <label class="beg-login-icon">
                    <i class="layui-icon"></i>
                </label>
                <input type="text" name="userName" lay-verify="userName" autocomplete="off" placeholder="这里输入登录名"
                       class="layui-input inputSty" value=""/>
            </div>
            <div class="layui-form-item">
                <label class="beg-login-icon">
                    <i class="layui-icon"></i>
                </label>
                <input type="password" name="password" lay-verify="password" autocomplete="off" placeholder="这里输入密码"
                       class="layui-input inputSty" value=""/>
            </div>
            <div class="layui-form-item" >
                <div class="beg-pull-left beg-login-remember">
                    <input type="radio" name="role" value="stu" title="学生" checked=""/>
                    <input type="radio" name="role" value="admin" title="宿舍管理员" />
                    <input type="radio" name="role" value="xitong" title="系统管理员"/>
                </div>
                <div class="beg-pull-right">
                    <button type="submit" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="login">
                        <i class="layui-icon"></i> 登录
                    </button>
                </div>
            </div>
            <div class="beg-clear"></div>
        </form>
    </div>
</div>
<script th:src="@{/layui/layui.all.js}"></script>
<script>
    var url = window.location.href;
//    console.log(url);

    var list = url.split("?")
    var name = list[1].split("=")[0]
    var value = list[1].split("=")[1]

    console.log(name+"="+value)

    if(list.length>0){
        layer.open({
            content: '用户名或密码错误！'
        });
    }

</script>



</body>
</html>